package com.gs.xbinfomytest.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ProjectName: xbinfoportal
 * @Package: com.dayang.config
 * @Description: java类作用描述
 * @Author: guoshuai
 * @CreateDate: 2019/6/26 19:44
 * @UpdateUser: guoshuai
 * @UpdateDate: 2019/6/26 19:44
 * @UpdateRemark: The modified content
 * @Version: 1.0
 **/
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Autowired
    private LoginInterceptor loginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor).addPathPatterns("/**")
                .excludePathPatterns("/ligerUI/**")
                .excludePathPatterns("/getVerify/**")
                .excludePathPatterns("/static/**")
                .excludePathPatterns("/login/**", "/loginIn","/loginout")
                .excludePathPatterns("/bootstrap/**")
                .excludePathPatterns("/css/**")
                .excludePathPatterns("/images/**")
                .excludePathPatterns("/pages/**")
                .excludePathPatterns("/js/**")
                .excludePathPatterns("/fonts/**")
                .excludePathPatterns("/jquery/**");

    }


}
